- item ||= f.object
%tbody.nested-fields
  - tableRowClassName = "e#{item.id}" if item.persisted?
  %tr{ class: tableRowClassName }
    %td= f.input :name, wrapper: :nested
    %td= f.input :memo, wrapper: :nested
    %td= f.input :transfered_on, wrapper: :nested
    %td.decimal= f.input :debit, wrapper: :nested, input_html: { data: { exclusive_nullify: (item.persisted? ? ".#{tableRowClassName} .credit" : 'filledbyjs') }, class: 'debit' }
    %td.currency= item.cash_currency
    %td.decimal= f.input(:credit, wrapper: :nested, input_html: { data: { exclusive_nullify: (item.persisted? ? ".e#{tableRowClassName} .debit" : 'filledbyjs') }, class: 'credit' })
    %td.currency= item.cash_currency
    %td.action= link_to_remove_association(content_tag(:i) + h(:destroy.ta), f, 'data-no-turbolink' => true, class: 'destroy')
